<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<script src="${pageContext.request.contextPath}/static/js/jQuery.js"></script>
<script>
</script>

<html>
<head>
    <title>Title</title>
</head>
<body>
<div class="data_list">
    <div class="data_list_title">
        <img src="${pageContext.request.contextPath}/static/images/user_edit_icon.png"/>个人信息
    </div>
    <div class="row-fluid" style="margin-top: 15px;">
      <div class="span4">
          <img src="${pageContext.request.contextPath}/${currentUser.imageName}">
      </div>
      <div class="span8">
          <form action="${pageContext.request.contextPath}/user?action=save" method="post" enctype="multipart/form-data">
              <table style="width:100%;border-collapse:separate; border-spacing:0px 10px;">
                  <tr>
                      <td>头像路径:</td>
                      <td><input type="file" name="imagePath"></td>
                  </tr>
                  <tr>
                      <td valign="top">个人昵称:</td>
                      <td><input type="text" id="nickName" name="nickName" style="height:25px;width: 80%" value="${currentUser.nickName}"></td>
                  </tr>
                  <tr>
                      <td valign="top">个人心情:</td>
                      <td>
                          <textarea name="mood" id="mood" cols="30" rows="10" style="width:80%;">${currentUser.mood}</textarea>
                      </td>
                  </tr>
                  <tr>
                      <input type="hidden" id="userId" name="userId" value="${currentUser.userId}">
                      <td><button class="btn btn-primary" type="submit">保存</button></td>
                      <td><button class="btn btn-primary" type="button" onclick="window.history.back()">返回</button></td>
                      <span style="color:red;">${error}</span>
                  </tr>
              </table>
          </form>
      </div>
    </div>
</div>
</body>
</html>
